#ifndef _RESOURCE_MANAGER_H_
#define _RESOURCE_MANAGER_H_

#include "SDL.h"
#include <SDL_mixer.h>
#include <string>
#include <iostream> //This is a fix for Mac. It must be included before map. I don't know why. -nfigg
#include <map>

typedef std::map<std::string, SDL_Surface*> imageMapType;
typedef std::map<std::string, Mix_Chunk*> soundMapType;
typedef std::map<std::string, Mix_Music*> musicMapType;

class ResourceManager
{
protected:
	imageMapType imageMap;
    soundMapType soundMap;
    musicMapType musicMap;
public:
	ResourceManager();
	~ResourceManager();

    //Image functions
	SDL_Surface* GetImage(std::string imageName, bool alphaFormat);
	void SetImage(std::string imageName, SDL_Surface* image);
	void RemoveImage(std::string imageName);
    //Sound functions
	Mix_Chunk* GetSound(std::string soundName);
	void SetSound(std::string soundName, Mix_Chunk* sound);
	void RemoveSound(std::string soundName);
    //Music functions
	Mix_Music* GetMusic(std::string musicName);
	void SetMusic(std::string musicName, Mix_Music* music);
	void RemoveMusic(std::string musicName);
};

#endif
